namespace FileTransferDesktop.Views.Windows;

/// <summary>
/// DialogWindow.xaml 的交互逻辑
/// </summary>
public partial class DialogWindow
{
    public DialogWindow()
    {
        InitializeComponent();
    }

    /// <summary>
    /// 设置对话框内容
    /// </summary>
    /// <param name="content">要显示的内容控件</param>
    public void SetContent(UIElement content)
    {
        ContentArea.Content = content;
    }

    /// <summary>
    /// 在所有者窗口上显示模态对话框
    /// </summary>
    /// <param name="owner">所有者窗口</param>
    /// <returns>对话框结果</returns>
    public bool? ShowDialog(Window owner)
    {
        Owner = owner;
        return base.ShowDialog();
    }
}
